package com.yaj.myfactorysupport.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yaj.myfactorysupport.entity.TLotTrace;
import com.yaj.myfactorysupport.mapper.TLotTraceMapper;
import com.yaj.myfactorysupport.service.TLotTraceService;
import com.yaj.myfactorysupport.util.RespBean;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wei
 * @since 2021-05-24
 */
@Service
public class TLotTraceServiceImpl extends ServiceImpl<TLotTraceMapper, TLotTrace> implements TLotTraceService {

    @Override
    public RespBean insertTLotTrace(List<TLotTrace> tLotTraces) {
        for (TLotTrace tLotTrace:tLotTraces
             ) {
            if(!this.save(tLotTrace)){
                return RespBean.success("保存失败");
            }
        }

        return RespBean.success("保存成功");
    }
}
